import Vue from "vue";
import VueRouter from "vue-router";
import Home from "../components/tabbar/Home.vue";
import search from "../components/tabbar/search.vue";
import shopCar from "../components/tabbar/shopCar.vue";
import vip from "../components/tabbar/vip.vue";
import imgShare from "../components/imgShare/imgShare.vue";
import news from "../components/news/news.vue";
import shopping from "../components/shopping/shopping.vue";
import addShop from '../components/tabbar/addshop.vue'
import newss from "../components/news/newss.vue";
import ImgDetail from "../components/imgShare/imgDetail.vue"


import shopdetails from "../components/shopping/shopdetails.vue";
import presentgoods from "../components/shopping/presentgoods.vue";
import comment from '../components/shopping/goodscomment.vue'
Vue.use(VueRouter);

const routes = [
  { path: "/", component: Home, redirect: '/home' },
  { path: "/home", component: Home },
  { path: "/search", component: search },
  { path: "/shopCar", component: shopCar },
  { path: "/vip", component: vip },
  { path: "/imgShare", component: imgShare },
  { path: "/news", component: news },
  // 商品路由
  { path: "/shopping", component: shopping },
  { path: "/addShop", component: addShop },

  { path:"/newss",name:"/newss",component: newss},
  { path: "/details/:id", component: shopdetails },
  { path: "/presentgoods/:id", component: presentgoods },
  { path: "/comment/:id", component: comment },



  { path: "/imgdetail", name:"imgDetail", component: ImgDetail }
];

const router = new VueRouter({
  mode: "hash",
  base: process.env.BASE_URL,
  routes
});

export default router;
